<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="jquery-2.0.0.min.js"></script>
    <style>
    *{
        margin: 0;
        padding: 0;
    }
    li{
        display: inline;
        list-style: none;
        background-color: red;
    }
    </style>
</head>
<body>
    <script>
        var i=0;
        do{
            i+=2;
        }while(i<10);
        alert(i);
    $(function(){
        $(".comment>li").each(function(index,ele){
            var opacity=(index+1)/10;
            $(ele).css("opacity",opacity)
        })
    })
    </script>
     <div class="comment">
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
         <li>☆</li>
     </div>
</body>
</html>